<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>文件界面</title>
  <link rel="stylesheet" href="css/common.css" />
  <link rel="stylesheet" href="css/iconfont.css" />
  <link rel="stylesheet" href="css/2.css" />
  <script src="js/vue.js"></script>
  <script src="js/axios.min.js"></script>
</head>

<body>

  <div id="app">
    <div id="header">
      <p>文件列表/<a href="index.html">首页/</a>
        <a href="image_show.html">图片预览</a>
      </p>
    </div>

    <div id="body">
      <table border="2rem" cellspacing="0" align="center">
        <tr>
          <th>
            <span>文件名</span>
            <i v-if="name" class="iconfont" @click.stop="list_name()">&#xe637;</i>
            <i v-else class="iconfont" @click.stop="list_name()">&#xe62e;</i>
          </th>
          <th><span>大小</span>
            <i v-if="size" class="iconfont" @click.stop="list_size()">&#xe637;</i>
            <i v-else class="iconfont" @click.stop="list_size()">&#xe62e;</i>
          </th>
          <th><span>上传时间</span>
            <i v-if="time" class="iconfont" @click.stop="list_time()">&#xe637;</i>
            <i v-else class="iconfont" @click.stop="list_time()">&#xe62e;</i>
          </th>
          <th>下载</th>
          <th>删除</th>
        </tr>

        <tr v-for="(item, index) in res" :key="index">
          <td>{{item.name}}</td>
          <td>{{item.size |pan_size}}</td>
          <td>{{item.time}}</td>
          <td>
            <a :href="urle(item.url)" :download="item.name">
              <button>下载</button>
            </a>
          </td>
          <td>
            <a :href="getGoodsHref(item.url)">
              <button>删除</button>
            </a>
          </td>
        </tr>
      </table>
    </div>
  </div>
  <script src="js/2.js"></script>
</body>

</html>